package pl.edu.agh.jemo.conf.types;

import java.util.ArrayList;
import java.util.List;

import pl.edu.agh.jemo.evolution.algorithm.AbstractAlgorithm;
import pl.edu.agh.jemo.evolution.algorithm.impl.NSGA2Algorithm;
import pl.edu.agh.jemo.evolution.algorithm.impl.SPEA2Algorithm;

/**
 * Class dedicated to list all available algorithm types.
 * It is used by user interface, in order to help user choosing an algorithm to run.
 * 
 * @author Marcin.Zbijowski
 *
 */
public class AlgorithmTypesHandler {

	/**
	 * Returns collection of all available implemented algorithms in jemo.
	 * Returned object is java.util.List, containing references to classes being extension of AbstractAlgorithm.
	 * This method should be updated when adding new algorithms.
	 * 
	 * @return List of objects representing classes of available algorithms
	 */
	public static List<PrintableType<? extends AbstractAlgorithm>> getAlgorithmTypes() {
		List<PrintableType<? extends AbstractAlgorithm>> classes = new ArrayList<PrintableType<? extends AbstractAlgorithm>>();
		classes.add(new PrintableType<NSGA2Algorithm>(NSGA2Algorithm.class, "NSGA2"));
		classes.add(new PrintableType<SPEA2Algorithm>(SPEA2Algorithm.class, "SPEA2"));
		return classes;
	}
}
